﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace QualitySupervision.Models
{
    public class Project
    {
        /// <summary>
        /// ID
        /// </summary>
        [Key] //主键 
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]  //设置自增
        public int ID { get; set; }

        /// <summary>
        /// 项目年份
        /// </summary>
        public int? Year { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        public string SerialNo { get; set; }

        /// <summary>
        /// 区县
        /// </summary>
        public string Area { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 委托金额
        /// </summary>
        [Description("委托金额")]
        public float? EntrustMoney { get; set; }

        /// <summary>
        /// 成本金额
        /// </summary>
        [Description("成本金额")]
        public float? CostMoney { get; set; }

        /// <summary>
        /// 不含税价
        /// </summary>
        public float? PriceExcludingTax { get; set; }

        /// <summary>
        /// 结算金额
        /// </summary>
        [Description("结算金额")]
        public float? SettlementMoney { get; set; }

        /// <summary>
        /// 预算含税总额(元)(含加成)
        /// </summary>
        public float? BudgetAmount { get; set; }

        /// <summary>
        /// 结算金额不含税
        /// </summary>
        [Description("结算不含税")]
        public float? SettlementMoneyExcludingTax { get; set; }

        ///// <summary>
        ///// 上家开票（万元）
        ///// </summary>
        //public float? PreviousInvoicing { get; set; }

        ///// <summary>
        ///// 下家开票（万元）
        ///// </summary>
        //public float? NextInvoicing { get; set; }

        /// <summary>
        /// 加成率
        /// </summary>
        public float? MarkUpRate { get; set; }

        /// <summary>
        /// 委托时间(相当于导入数据里的委托完成时间)
        /// </summary>
        [Description("委托时间")]
        public DateTime? EntrustTime { get; set; }

        /// <summary>
        /// 询价时间
        /// </summary>
        [Description("询价时间")]
        public DateTime? InquiryTime { get; set; }

        /// <summary>
        /// 合同签订时间
        /// </summary>
        [Description("合同签订时间")]
        public DateTime? ContractSignTime { get; set; }

        /// <summary>
        /// 终验时间
        /// </summary>
        [Description("终验时间")]
        public DateTime? FinalInspectionTime { get; set; }

        /// <summary>
        /// 结算时间
        /// </summary>
        [Description("结算时间")]
        public DateTime? SettlementTime { get; set; }

        /// <summary>
        /// 维护周期（年）
        /// </summary>
        [Description("维护周期（年）")]
        public string MaintenanceCycle { get; set; }

        /// <summary>
        /// 移动项目编号
        /// </summary>
        public string MobileProjectNo { get; set; }

        /// <summary>
        /// 项目经理
        /// </summary>
        public string ProjectManager { get; set; }

        /// <summary>
        /// 服务经理
        /// </summary>
        public string ServiceManager { get; set; }

        /// <summary>
        /// 当前阶段
        /// </summary>
        [Description("当前阶段")]
        public string CurrentStage { get; set; }

        /// <summary>
        /// 周三更新备注（政企部的备注）
        /// </summary>
        [Description("周三更新备注")]
        public string Zhousanbeizhu { get; set; }

        /// <summary>
        /// 供应商
        /// </summary>
        public string Supplier { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        [Description("联系人")]
        public string Contacts { get; set; }

        /// <summary>
        /// 委托时现场是否已完工
        /// </summary>
        public string IsFinish { get; set; }

        /// <summary>
        /// 是否已交维
        /// </summary>
        [Description("是否已交维")]
        public string IsMaintain { get; set; }

        /// <summary>
        /// 备注（政企部的备注）
        /// </summary>
        public string Beizhu { get; set; }

        /// <summary>
        /// 提计应收
        /// </summary>
        public float? Income { get; set; }

        /// <summary>
        /// 提计实收
        /// </summary>
        public float? ActuallyIncome { get; set; }

        /// <summary>
        /// 确认收入时间
        /// </summary>
        public DateTime? IncomeTime { get; set; }

        /// <summary>
        /// 业主终验时间
        /// </summary>
        public DateTime? OwnerAcceptanceTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
        //public DateTime? CreateTime { get; set; } = DateTime.Now.AddHours(8);
        //public DateTime? CreateTime { get; set; } = DateTime.Now();

        public Project()
        {
            //Contracts = new List<Contract>();
            Fujians = new List<Fujian>();
            Messages = new List<Message>();
        }
        /////// <summary>
        /////// 合同文件
        /////// </summary>
        //public virtual List<Contract> Contracts { get; set; }
        /// <summary>
        /// 过程材料
        /// </summary>
        public virtual List<Fujian> Fujians { get; set; }
        /// <summary>
        /// 项目跟进信息
        /// </summary>
        public virtual List<Message> Messages { get; set; }

        /// <summary>
        /// 合同类别(设备)
        /// </summary>
        [Description("合同类别(设备)")]
        public string Contractsignkind1 { get; set; }

        /// <summary>
        /// 委托金额1
        /// </summary>
        [Description("委托金额1")]
        public float? EntrustMoney1 { get; set; }

        /// <summary>
        /// 成本金额1
        /// </summary>
        [Description("成本金额1")]
        public float? CostMoney1 { get; set; }

        /// <summary>
        /// 不含税价
        /// </summary>
        [Description("不含税价1")]
        public float? PriceExcludingTax1 { get; set; }

        /// <summary>
        /// 结算金额
        /// </summary>
        [Description("结算金额1")]
        public float? SettlementMoney1 { get; set; }

        /// <summary>
        /// 结算金额不含税
        /// </summary>
        [Description("结算金额不含税1")]
        public float? SettlementMoneyExcludingTax1 { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        [Description("税率1")]
        public float? Tax1 { get; set; }

        /// <summary>
        /// 合同类别(施工)
        /// </summary>
        public string Contractsignkind2 { get; set; }

        /// <summary>
        /// 委托金额
        /// </summary>
        public float? EntrustMoney2 { get; set; }

        /// <summary>
        /// 成本金额
        /// </summary>
        public float? CostMoney2 { get; set; }

        /// <summary>
        /// 不含税价
        /// </summary>
        public float? PriceExcludingTax2 { get; set; }

        /// <summary>
        /// 结算金额
        /// </summary>
        public float? SettlementMoney2 { get; set; }

        /// <summary>
        /// 结算金额不含税
        /// </summary>
        public float? SettlementMoneyExcludingTax2 { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public float? Tax2 { get; set; }

        /// <summary>
        /// 合同类别(集成)
        /// </summary>
        public string Contractsignkind3 { get; set; }

        /// <summary>
        /// 委托金额
        /// </summary>
        public float? EntrustMoney3 { get; set; }

        /// <summary>
        /// 成本金额
        /// </summary>
        public float? CostMoney3 { get; set; }

        /// <summary>
        /// 不含税价
        /// </summary>
        public float? PriceExcludingTax3 { get; set; }

        /// <summary>
        /// 结算金额
        /// </summary>
        public float? SettlementMoney3 { get; set; }

        /// <summary>
        /// 结算金额不含税
        /// </summary>
        public float? SettlementMoneyExcludingTax3 { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public float? Tax3 { get; set; }

        /// <summary>
        /// 合同类别(维护)
        /// </summary>
        public string Contractsignkind4 { get; set; }

        /// <summary>
        /// 委托金额
        /// </summary>
        public float? EntrustMoney4 { get; set; }

        /// <summary>
        /// 成本金额
        /// </summary>
        public float? CostMoney4 { get; set; }

        /// <summary>
        /// 不含税价
        /// </summary>
        public float? PriceExcludingTax4 { get; set; }

        /// <summary>
        /// 结算金额
        /// </summary>
        public float? SettlementMoney4 { get; set; }

        /// <summary>
        /// 结算金额不含税
        /// </summary>
        public float? SettlementMoneyExcludingTax4 { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public float? Tax4 { get; set; }

        /// <summary>
        /// 合同类别(软件开发)
        /// </summary>
        public string Contractsignkind5 { get; set; }

        /// <summary>
        /// 委托金额
        /// </summary>
        public float? EntrustMoney5 { get; set; }

        /// <summary>
        /// 成本金额
        /// </summary>
        public float? CostMoney5 { get; set; }

        /// <summary>
        /// 不含税价
        /// </summary>
        public float? PriceExcludingTax5 { get; set; }

        /// <summary>
        /// 结算金额
        /// </summary>
        public float? SettlementMoney5 { get; set; }

        /// <summary>
        /// 结算金额不含税
        /// </summary>
        public float? SettlementMoneyExcludingTax5 { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public float? Tax5 { get; set; }
        /// <summary>
        /// 是否结束(额外添加)
        /// </summary>
        public string Sfjs { get; set; }

        /// <summary>
        /// 是否直拓(额外添加)
        /// </summary>
        public string Sfzt { get; set; }

        /// <summary>
        /// 前期集成公司支撑(额外添加)
        /// </summary>
        public string Qqjcgszc { get; set; }

        /// <summary>
        /// 是否发布(额外添加)
        /// </summary>
        public string Sffb { get; set; }

        /// <summary>
        /// 项目编号(额外添加)
        /// </summary>
        public string Xmbh { get; set; }

        /// <summary>
        /// 区域(额外添加)
        /// </summary>
        public string Qy { get; set; }

        /// <summary>
        /// 项目经理(额外添加)
        /// </summary>
        public string Xmjl { get; set; }

        /// <summary>
        /// 能力部门(额外添加)
        /// </summary>
        public string Nlbm { get; set; }

        /// <summary>
        /// 建设方式(额外添加)
        /// </summary>
        public string Jsfs { get; set; }

        /// <summary>
        /// 商务合作模式(额外添加)
        /// </summary>
        public string Swhzms { get; set; }

        /// <summary>
        /// 是否项目审计(额外添加)
        /// </summary>
        public string Sfxmsj { get; set; }

        /// <summary>
        /// 是否采购框架合同(额外添加)
        /// </summary>
        public string Sfcgkjht { get; set; }

        /// <summary>
        /// 是否纳入PMO管理(额外添加)
        /// </summary>
        public string SfnrPMOgl { get; set; }

        /// <summary>
        /// 建设模式(额外添加)
        /// </summary>
        public string Jsms { get; set; }

        /// <summary>
        /// 支出模式(额外添加)
        /// </summary>
        public string Zcms { get; set; }

        /// <summary>
        /// 是否外购(额外添加)
        /// </summary>
        public string Sfwg { get; set; }

        /// <summary>
        /// 是否纯外购(额外添加)
        /// </summary>
        public string Sfcwg { get; set; }

        /// <summary>
        /// 云网集成金额(元)(额外添加)----如果是数字类型转字符串
        /// </summary>
        public string Ywjcje { get; set; }

        /// <summary>
        /// 产品研发金额(元)(额外添加)----如果是数字类型转字符串
        /// </summary>
        public string Cpyfje { get; set; }

        /// <summary>
        /// 产品支撑金(元)(额外添加)----如果是数字类型转字符串
        /// </summary>
        public string Cpzcje { get; set; }

        /// <summary>
        /// 平台数智运营(元)(额外添加)----如果是数字类型转字符串
        /// </summary>
        public string Ptszyy { get; set; }

        /// <summary>
        /// 中标金额(元)(额外添加)
        /// </summary>
        public float? Zbje { get; set; }

        /// <summary>
        /// 合同签约金额(元)(额外添加)
        /// </summary>
        public float? Htqyje { get; set; }

        /// <summary>
        /// 预立项收入金额(元)(额外添加)
        /// </summary>
        public float? Ylxsrje { get; set; }

        /// <summary>
        /// 预立项成本金额(元)(额外添加)
        /// </summary>
        public float? Ylxcbje { get; set; }

        /// <summary>
        /// 委托日期(额外添加)
        /// </summary>
        public DateTime? Wtrq { get; set; }

        /// <summary>
        /// 中标日期(额外添加)
        /// </summary>
        public DateTime? Zbrq { get; set; }

        /// <summary>
        /// 中标委托时长(自然日)(额外添加)
        /// </summary>
        public int? Zbwtsc { get; set; }

        /// <summary>
        /// 一级行业(额外添加)
        /// </summary>
        public string Yjhy { get; set; }

        /// <summary>
        /// 二级行业(额外添加)
        /// </summary>
        public string Erhy { get; set; }

        /// <summary>
        /// 项目分类(额外添加)
        /// </summary>
        public string Xmfl { get; set; }

        /// <summary>
        /// 项目类型(售中)(额外添加)
        /// </summary>
        public string Xmlx { get; set; }

        /// <summary>
        /// 站点数(室内)
        /// </summary>
        public int? Zdssn { get; set; }

        /// <summary>
        /// 站点数(室外)(额外添加)
        /// </summary>
        public int? Zdssw { get; set; }

        /// <summary>
        /// CT配合(额外添加)
        /// </summary>
        public string Ctph { get; set; }

        /// <summary>
        /// 项目阶段(额外添加)
        /// </summary>
        public string Xmjd { get; set; }

        /// <summary>
        /// CT进度(%)(额外添加)
        /// </summary>
        public int? Ctjd { get; set; }

        /// <summary>
        /// CT与IT配合度(额外添加)
        /// </summary>
        public string Ctyit { get; set; }

        /// <summary>
        /// 滞后原因(额外添加)
        /// </summary>
        public string Zhyy { get; set; }

        /// <summary>
        /// 要求终验时间(额外添加)
        /// </summary>
        public DateTime? Yqzysj { get; set; }

        /// <summary>
        /// 项目团队组建日期(额外添加)
        /// </summary>
        public DateTime? Xmtdzjrq { get; set; }

        /// <summary>
        /// 启动时间(额外添加)
        /// </summary>
        public DateTime? Qdsj { get; set; }

        /// <summary>
        /// 实施方案系统提交时间(额外添加)
        /// </summary>
        public DateTime? Ssfaxttjsj { get; set; }

        /// <summary>
        /// 实施方案提交时间(额外添加)
        /// </summary>
        public DateTime? Ssfatjsj { get; set; }

        /// <summary>
        /// 实施方案确认时间(额外添加)
        /// </summary>
        public DateTime? Ssfaqrsj { get; set; }

        /// <summary>
        /// 计划开工时间(额外添加)
        /// </summary>
        public DateTime? Jhkgsj { get; set; }

        /// <summary>
        /// 开工逾期天数(额外添加)
        /// </summary>
        public int? Kgyqts { get; set; }

        /// <summary>
        /// 实际开工时间(额外添加)-------要把斜杆转为null
        /// </summary>
        public DateTime? Sjkgsj { get; set; }

        /// <summary>
        /// 第一次采购完成时间(额外添加)
        /// </summary>
        public DateTime? Dyccgwcsj { get; set; }

        /// <summary>
        /// 采购完成时间(额外添加)
        /// </summary>
        public DateTime? Cgwcsj { get; set; }

        /// <summary>
        /// 计划到货时间(额外添加)
        /// </summary>
        public DateTime? Jhdhsj { get; set; }

        /// <summary>
        /// 到货时间(额外添加)
        /// </summary>
        public DateTime? Dhsj { get; set; }

        /// <summary>
        /// 项目交底时间(额外添加)
        /// </summary>
        public DateTime? Xmjdsj { get; set; }

        /// <summary>
        /// 项目交底会议时间(额外添加)
        /// </summary>
        public DateTime? Xmjdhysj { get; set; }

        /// <summary>
        /// 计划上线时间(额外添加)
        /// </summary>
        public DateTime? Jhsxsj { get; set; }

        /// <summary>
        /// 上线逾期天数(额外添加)
        /// </summary>
        public int? Sxqyts { get; set; }

        /// <summary>
        /// 实际上线时间(额外添加)-------要把斜杆转为null
        /// </summary>
        public DateTime? Sjsxsj { get; set; }

        /// <summary>
        /// 业主初验时间(额外添加)
        /// </summary>
        public DateTime? Yzcysj { get; set; }

        /// <summary>
        /// 母公司实际初验时间(额外添加)
        /// </summary>
        public DateTime? Mgssjcysj { get; set; }

        /// <summary>
        /// 业主终验时间(额外添加)
        /// </summary>
        public DateTime? Yzzysj { get; set; }

        /// <summary>
        /// 母公司计划终验时间(额外添加)
        /// </summary>
        public DateTime? Mgsjhzysj { get; set; }

        /// <summary>
        /// 终验逾期天数(额外添加)
        /// </summary>
        public int? Zyyqts { get; set; }

        /// <summary>
        /// 母公司实际终验时间(额外添加)
        /// </summary>
        public DateTime? Mgssjzysj { get; set; }

        /// <summary>
        /// 计划转维时间(额外添加)
        /// </summary>
        public DateTime? Jhzwsj { get; set; }

        /// <summary>
        /// 转维完成时间(额外添加)
        /// </summary>
        public DateTime? Zwwcsj { get; set; }

        /// <summary>
        /// 更新时间(额外添加)
        /// </summary>
        public DateTime? Gxsj { get; set; }

        /// <summary>
        /// 是否与项目实际阶段匹配(额外添加)
        /// </summary>
        public string Sfyxmsjjdpp { get; set; }

        /// <summary>
        /// 备注(额外添加)
        /// </summary>
        public string Bz { get; set; }

        /// <summary>
        /// 集成公司建设单位(额外添加)
        /// </summary>
        public string Jcgsjsdw { get; set; }

        /// <summary>
        /// 前向合同履行开始时间(额外添加)
        /// </summary>
        public DateTime? Xqhtlxkssj { get; set; }

        /// <summary>
        /// 前向合同履行结束时间(额外添加)
        /// </summary>
        public DateTime? Xqhtlxjssj { get; set; }

        /// <summary>
        /// 转维状态(额外添加)
        /// </summary>
        public string Zwzt { get; set; }

        /// <summary>
        /// 维护结束时间(额外添加)
        /// </summary>
        public DateTime? Whjssj { get; set; }

        /// <summary>
        /// 维护状态(额外添加)
        /// </summary>
        public string Whzt { get; set; }

        /// <summary>
        /// 维护类型(额外添加)
        /// </summary>
        public string Whlx { get; set; }

        /// <summary>
        /// 维护周期（月）(额外添加)
        /// </summary>
        public int? Whzq { get; set; }

        /// <summary>
        /// 质保周期（月）(额外添加)
        /// </summary>
        public int? Zbzq { get; set; }
    }
}
